package com.kaibes.core.base.thread;

public interface RunThread extends Runnable {
    void doWork();
    boolean isRunning();
    void setRunning();
    void stop();
    
    @Override
    default void run() {
        setRunning();
        doWork();
    }
    default void start() {
        new Thread(this).start();
    }
}
